package com.avic.rong.transform.api;

import com.avic.rong.api.HttpPostService;
import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.orhanobut.logger.Logger;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

/**
 * Created by Chenjiaxin on 2019/7/24 14:10
 * E-Mail Address：16601203965@163.com
 */
public class HallAttrApi extends BaseApi {


    public static final String TYPE_ELSE = "else";
    public static final String TYPE_SUPPLY = "supply";
    //supply   :  供应列表
    //else ：　需求列表
    private String type = "else";


    public void setType(String type) {
        this.type = type;
    }

    public HallAttrApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener) {
        super(rxAppCompatActivity, listener);
        setCache(false);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService service = retrofit.create(HttpPostService.class);
        Logger.i("--------------type:--" + type);
        return service.sdhallFilterList(type);

    }


}
